package com.outstanding.ifml.warpper;

import static com.outstanding.ifml.parser.IFMLToken.BLANK;
import static com.outstanding.ifml.parser.IFMLToken.TABBLANK;
import static com.outstanding.ifml.parser.IFMLToken.COLON;
import static com.outstanding.ifml.parser.IFMLToken.COMMA;
import static com.outstanding.ifml.parser.IFMLToken.COMMENT;
import static com.outstanding.ifml.parser.IFMLToken.DOUBLEQUOTATION;
import static com.outstanding.ifml.parser.IFMLToken.EOF;
import static com.outstanding.ifml.parser.IFMLToken.IDENTIFIER;
import static com.outstanding.ifml.parser.IFMLToken.LBRACKET;
import static com.outstanding.ifml.parser.IFMLToken.LITERALS;
import static com.outstanding.ifml.parser.IFMLToken.LPAREN;
import static com.outstanding.ifml.parser.IFMLToken.RBRACKET;
import static com.outstanding.ifml.parser.IFMLToken.RETURN;
import static com.outstanding.ifml.parser.IFMLToken.RPAREN;
import static com.outstanding.ifml.parser.IFMLToken.LBRACE;
import static com.outstanding.ifml.parser.IFMLToken.RBRACE;

import java.util.ArrayList;
import java.util.List;

import com.outstanding.ifml.exception.IFMLException;
import com.outstanding.ifml.parser.IFMLToken;

public class Prop extends AbstractToken {

	// state 有几种状态
	// 0 初始；1正在构建变量； 2正在构建值； 9完成
	public Prop() {
		super(TokenType.PROP);
		this.identifier = new Identifier();
		this.state = State.init;
	}

	// 变量
	private Identifier identifier;

	public void setIdentifier(Identifier identifier) {
		this.identifier = identifier;
	}


	public void setValue(Value value) {
		this.value = value;
		this.state = State.finish;
	}


	public Identifier getIdentifier() {
		return identifier;
	}

	private Value value;

	public Value getValue() {
		return value;
	}
	
	
	// 在遇到冒号时
	public void onPutColon(Value value) {
		this.state = State.valuing;
		this.identifier.complete();
		this.value = value;
		this.value.complete();
		this.state =State.finish;
	}

	

	
	public void complete() {

	}

	

}
